package com.customer.feign.service;

import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class MyFallBackFactory implements FallbackFactory<TestFeignService> {

    @Override
    public TestFeignService create(Throwable cause) {
        return new TestFeignService() {
            @Override
            public String getDemo() {
                return "这里是服务降级~~生产者挂掉了！！！";
            }
        };
    }
}
